package com.incar.chuxing.adapter;

import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;

import com.baidu.mapapi.search.core.PoiInfo;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.incar.chuxing.R;
import com.incar.chuxing.bean.AppConstants;
import com.incar.chuxing.bean.PoiInfoBean;

import java.util.List;

public class DeliverLocAdapter extends BaseQuickAdapter<PoiInfoBean, BaseViewHolder> {

    public DeliverLocAdapter(List<PoiInfoBean> mData) {
        super(R.layout.item_deliver_map_bottom, mData);
    }

    @Override
    protected void convert(final BaseViewHolder helper, PoiInfoBean item) {
        helper.setText(R.id.position_item0, item.getName());
        helper.setText(R.id.position_item1, item.getAddress());
        ((CheckBox) helper.getView(R.id.position_cb)).setChecked(item.isChecked());
    }
}